#pragma once


class CChatFrameMgr;
// CChatFrame dialog
class CChatFrame : public CDialog
{
	DECLARE_DYNAMIC(CChatFrame)

public:
	CChatFrame(CWnd* pParent = NULL);   // standard constructor
	virtual ~CChatFrame();

// Dialog Data
	enum { IDD = IDD_DIALOG_CHATFRAME };

	void Init(CChatFrameMgr *pMgr,TCHAR *szMyAccount,TCHAR *szToAccount);
	void AddOnMessage(TCHAR *szFrom,TCHAR *szTo,TCHAR *szMsg);
protected:
	afx_msg void OnSize(UINT nType, int cx, int cy);
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	virtual void OnCancel();
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	afx_msg void OnClose();

	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnBnClickedButtonSendmsg();
	
	virtual BOOL PreTranslateMessage(MSG* pMsg);
private:
	CString GetCurrentTimeString();

	CChatFrameMgr					*m_pChatFrameMgr;
	CString							m_strMyAccount;
	CString							m_strToAccount;
	HWND							m_hWndEdit;
public:
	afx_msg void OnBnClickedSendFile();
};
